﻿using Kernelx.Contexts.Configuration;
using Kernelx.Contexts.Core;
using System;
using System.Collections.Generic;

namespace Kernelx.Contexts.AspNetCoreImpls
{
    partial class NetCoreWorkloadContext : IBackWorkloadScope
    {
        public IBackWorkloadScope SetRequsetContent(object parameters, IList<FileWrapper> fileWrappers)
        {
            _requestParameters?.Dispose();
            _requestParameters = RequsetParameter.Create(parameters);
            _fileWrappersLazy = new Lazy<IEnumerable<FileWrapper>>(() => fileWrappers);
            return this;
        } 
    }
}
